package com.ruoyi.transaction.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 商品SPU对象 spu
 * 
 * @author ruoyi
 * @date 2025-08-07
 */
public class Spu extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** SPU ID（标准商品ID） */
    @Excel(name = "SPU ID", readConverterExp = "标=准商品ID")
    private Long id;

    /** 所属分类ID（关联 category） */
    @Excel(name = "所属分类ID", readConverterExp = "关=联,c=ategory")
    private Long categoryId;

    /** 商品名称，如：伊利纯牛奶 */
    @Excel(name = "商品名称，如：伊利纯牛奶")
    private String name;

    /** 品牌名称，如：伊利、金龙鱼 */
    @Excel(name = "品牌名称，如：伊利、金龙鱼")
    private String brandName;

    /** 商品单位，如瓶、袋、箱 */
    @Excel(name = "商品单位，如瓶、袋、箱")
    private String unit;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 商品图片地址（多张图使用逗号分隔） */
    @Excel(name = "商品图片地址", readConverterExp = "多=张图使用逗号分隔")
    private String imageUrls;

    /** 条形码（部分平台用于识别） */
    @Excel(name = "条形码", readConverterExp = "部=分平台用于识别")
    private String barcode;

    /** 是否上架（0-下架，1-上架） */
    @Excel(name = "是否上架", readConverterExp = "0=-下架，1-上架")
    private String isActive;

    /** 删除标志（0-未删除，1-已删除） */
    private String delFlag;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setCategoryId(Long categoryId) 
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId() 
    {
        return categoryId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setBrandName(String brandName) 
    {
        this.brandName = brandName;
    }

    public String getBrandName() 
    {
        return brandName;
    }

    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setImageUrls(String imageUrls) 
    {
        this.imageUrls = imageUrls;
    }

    public String getImageUrls() 
    {
        return imageUrls;
    }

    public void setBarcode(String barcode) 
    {
        this.barcode = barcode;
    }

    public String getBarcode() 
    {
        return barcode;
    }

    public void setIsActive(String isActive) 
    {
        this.isActive = isActive;
    }

    public String getIsActive() 
    {
        return isActive;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("categoryId", getCategoryId())
            .append("name", getName())
            .append("brandName", getBrandName())
            .append("unit", getUnit())
            .append("description", getDescription())
            .append("imageUrls", getImageUrls())
            .append("barcode", getBarcode())
            .append("isActive", getIsActive())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
